<div class = "main-view"><!--最外层div-->
    <div class="left-margin top-margin"><strong class="am-text-primary am-text-lg">小区申请</strong></div>
    <form class="am-form-inline left-margin top-margin" role="form">
        <div class="am-form-group">
            <label>小区名称</label> <input type="text" class="am-form-field" ng-model="communityName">
            <label>申请状态:</label>
            <select style="height: 32px" ng-model="status">
                <option value=''>全部</option>
                <option value=0>处理中</option>
                <option value=1>已通过</option>
                <option value=-1>已拒绝</option>
            </select>
        </div>
        <button type="submit" class="am-btn am-btn-primary" ng-click="applySearch()" data-target = "cascad-search">搜索</button>
    </form>
    <br>
    <!--<div class="am-btn-group am-btn-group-xs left-margin top-margin">-->
        <!--<button type="button" class="am-btn am-btn-default" data-am-modal="{target: '#doc-modal-import', width: 800, height: 300}"><span class="am-icon-plus"></span> 导入小区</button>-->
    <!--</div>-->

    <div id = "pagination" class = "pagination"></div>
    <div class="pagination-table left-margin" id="tab_apply" style = "margin-top: 0px;">
        <form class="am-form">
            <table class="am-table-striped am-table-hover table-main">
                <thead>
                <tr>
                    <th class="table-check"><input type="checkbox" ng-click="allSelected()"></th>
                    <th class="table-title">城市</th>
                    <th class="table-title">县区</th>
                    <th class="table-title">小区名称</th>
                    <th class="table-title">详细地址</th>
                    <th class="table-title">申请类别</th>
                    <th class="table-title">申请人</th>
                    <th class="table-title">申请人电话</th>
                    <th class="table-title">申请时间</th>
                    <th class="table-title">备注</th>
                    <th class="table-title">状态</th>
                    <th class="table-title">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="apply in applyList" id = "{{apply.ObjId}}">
                    <td class="table-check"><input type="checkbox" class = "item-check"></td>
                    <td>{{apply.city.name}}</td>
                    <td>{{apply.county.name}}</td>
                    <td style="width: 200px;word-wrap:break-word;">{{apply.communityName}}</td>
                    <td style="width: 200px;word-wrap:break-word;">{{apply.address}}</td>
                    <td style="width: 65px;">{{apply.type ==2 ? '父母小区':'本小区'}}</td>
                    <td>{{apply.user.nickName}}</td>
                    <td>{{apply.user.mobilePhone}}</td>
                    <td>{{apply.dateCreated|date:"yyyy-MM-dd HH:mm:ss"}}</td>
                    <td title="{{apply.note}}" style="width: 400px;word-wrap:break-word;">{{apply.note}}</td>
                    <td ng-show="apply.status==1">{{'已通过'}}</td>
                    <td ng-show="apply.status==-1">{{'已拒绝'}}</td>
                    <td ng-show="apply.status==0">{{'未处理'}}</td>

                    <td>
                        <button ng-show="apply.status == 0" class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                ng-click="passShow(apply)"><span class="am-icon-pencil-square-o"></span> 通过
                        </button>
                        <button ng-show="apply.status == 0" class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                ng-click="rejectShow(apply)">
                            <span class="am-icon-pencil-square-o"></span> 拒绝
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>

    <div class = "left-margin">共<span id = 'page_number'>{{pageNumber}}</span>页 <span>{{count}}条数据</span></div>

    <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-pass">
        <div class="am-modal-dialog">
            <div class="am-modal-hd border-bottom" style = "text-align: left;">通过申请
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd body-area text-left">
                <form>
                    <label>提示信息：</label>
                    <textarea style="width:580px;height:150px;" ng-model="passApply.msg" required tabindex="5"></textarea>
                </form>
            </div>
            <div class = "button-area border-top">
                <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="applyPass(passApply)" data-target = "cascad-search-add">确认</button>
            </div>
        </div>
    </div>

    <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-reject">
        <div class="am-modal-dialog">
            <div class="am-modal-hd border-bottom" style = "text-align: left;">拒绝申请
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd body-area text-left">
                <form>
                    <label>提示信息：</label>
                    <textarea style="width:580px;height:150px;" ng-model="rejectApply.msg" required tabindex="5"></textarea>
                </form>
            </div>
            <div class = "button-area border-top">
                <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="applyReject(rejectApply)" data-target = "cascad-search-add">确认</button>
            </div>
        </div>
    </div>

</div>